home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 16 / q16.d81 / t.c64 by 80 < prev    next >
Text File  |  2022-08-28  |  6KB  |  116 lines

  1.                               C 6 4    B Y    8 0
  2.  
  3.                              by Robert Rockefeller
  4.  
  5.      C64 BY 80 is a program which allows C-128 users to make use of the
  6. 80-column VDC chip while in 64 mode.  IT WILL NOT WORK ON A C-64.  IT ONLY
  7. WORKS ON A C-128 OR C-128D IN THE 64 MODE.  It works by replacing the C-64's
  8. built-in screen editor with a custom editor which uses the 80-column VDC
  9. chip rather than the 40-column VIC chip.  There is no Run It for this
  10. program since you have to be in the 64 mode to LOAD and RUN it.
  11.  
  12.      You can use C64 BY 80 to program and/or RUN BASIC 2.0 programs.  The
  13. program will install itself at hex address $C000 (49152), and replace the
  14. standard Kernel CHRIN and CHROUT subroutines with its own versions.  You can
  15. use all the standard keys that you normally use in 64 mode such as HOME,
  16. CLR, DEL, the CRSR keys, etc.
  17.  
  18. NOTE: What you can't use are any POKEs that you would normally use to
  19. control text on the screen.  This includes POKEing color memory, POKEing
  20. characters to the screen, POKEing 199 to cause reverse printing, etc... 
  21. Control codes are the way to go here.  Control codes specific to the VDC
  22. chip will work, too.  For instance, CTRL-O will cause flashing characters
  23. and CTRL-B will cause underlined characters, which are features of the VDC
  24. chip, not the computer.  If your program prints data that scrolls on the
  25. screen, make sure that you program in a pause capability. Pressing CONTROL,
  26. which normally slows or pauses scrolling, doesn't work with C64 BY 80. 
  27. Also, if you use RAMLink, you may have trouble going into the 2MHZ mode
  28. using the $c000 kernal routine.
  29.  
  30.      In addition, a few extra functions are provided.  In the list below, F1
  31. E means to type and release the F1 function key, then type and release the E
  32. key.  CONTROL-A means to type the CONTROL key and the A key at the same
  33. time.  Don't enter SHIFTed keys.  The commands below are in upper-case mode,
  34. assuming that you will be programming in the upper-case mode.
  35.  
  36.  F1 E : Make the cursor non-flashing.
  37.  F1 F : Make the cursor flash.
  38.  F1 S : Use a block cursor.
  39.  F1 U : Use an underline cursor.
  40.  F1 N : Put the screen into normal (non-reversed) mode.
  41.  F1 R : Put the screen into reverse video mode.
  42.  
  43.  CONTROL-A : Move the cursor to the start of the line.
  44.  CONTROL-Z : Move the cursor to the end of the line.
  45.  CONTROL-V : Enter quote and/or insert mode.
  46.  CONTROL-X : Exit quote and/or insert mode.
  47.  CONTROL-D : Delete the line the cursor is on.
  48.  CONTROL-F : Insert a blank line at the cursor position.
  49.  CONTROL-O : Print flashing text.
  50.  CONTROL-P : Print the screen to the printer.
  51.  CONTROL-W : Move the cursor to the bottom left corner of the screen.
  52.  F3        : Display a help screen.
  53.  F7        : Delete the character under the cursor.
  54.  
  55.      In addition to the extra key functions there are several subroutines
  56. provided beginning at HEX address $C000.  The subroutines can be used from
  57. BASIC with the SYS command, or from machine language with a JSR.  They are:
  58.  
  59.  49152 : Enable C64 BY 80 by initializing the VDC chip, and re-directing the
  60. Kernel CHROUT, and CHRIN vectors to C64 BY 80 subroutines.
  61.  
  62.  49155 : Disable C64 BY 80.
  63.  
  64.  49158 : Initialize the VDC chip by re-initializing the registers with
  65. default values, and downloading the character set into VDC RAM.
  66.  
  67.  49161 : Print (CHROUT) a character to the 80-column screen.  The
  68. Accumulator register must contain the character to be printed.  The
  69. character is always printed to the 80-column screen even if CMD or the
  70. Kernal CHKOUT subroutine has been used to set output to another device.
  71.  
  72.  49164 : Get a line (CHRIN) from the 80-column screen.  The line is always
  73. gotten from the 80-column screen even if the Kernal CHKIN subroutine has
  74. been used to set input from another device.
  75.  
  76.  49167 : Turn on the 80-column cursor.  This function is useful for custom
  77. INPUT routines.
  78.  
  79.  49170 : Turn off the 80-column cursor.  This function is useful for custom
  80. INPUT routines.
  81.  
  82.  49173 : Move the cursor to the specified coordinates.  The X register
  83. should contain the row number from 0 to 24.  The Y register should contain
  84. the column number from 0 to 79.
  85.  
  86.  49176 : Read the cursor position. The X register will contain the row
  87. number.  The Y register will contain the column number.
  88.  
  89.  49179 : Use the 40-column screen without disabling C64 BY 80.
  90.  
  91.  49182 : Use the 80-column screen.
  92.  
  93.  49185 : Set the CPU to 2 MHz clock speed.
  94.  
  95.  49188 : Set the CPU to 1 MHz clock speed.
  96.  
  97.      As you can see, C64 BY 80 allows you to do things in the 64 mode that
  98. you have taken for granted in the 128 80-column mode.  Of course there are
  99. some 64 commands that won't work on the 80-column screen.  For instance,
  100. don't use POKE214,X to position the cursor; use SYS49173.  The whole $C000
  101. area is used by C64 BY 80 so you must put ML and data elsewhere.
  102.  
  103. RR
  104.  
  105. FENDER'S NOTE: This unusual program was published on LOADSTAR #97 for the
  106. C-64, even though it won't run on a C-64.  It's a tricky thing to justify --
  107. a program that works in the 64 mode but only on a C-128 -- but I feel it's
  108. something that we all should have.  You can work on a 64 program but use the
  109. added capabilities of the 80-column editing screen.  You can write an
  110. 80-column program but use the larger library of 64 ML routines.  I'm sure
  111. other uses of this program will occur to you as time goes by.  In any case,
  112. it's small and fits nicely into the remaining blocks left on Side Two. 
  113. Don't forget C64 BY 80, it may come in handy.
  114.  
  115.                          ***** End of Text *****                            
  116.